import Vuex from 'vuex'

import Vue from 'vue'

Vue.use(Vuex)
export default new Vuex.Store({
	state: {
		gTitle: {
			text: "你好Vuex",
			color: "#000",
			fontSize: "24px",
			background: "#f70"
		}
	},
	mutations: {
		setSize(state, data) {
			state.gTitle.fontSize = data + "px"
		},
		setBackgroundColor(state, data) {
			state.gTitle.background = data;
		}
	},
	actions: {},
	getters: {},
	modules: {}
})
